import request from '@/utils/request'

//添加
export function addScheduler(data) {
  return request({
    url: `/tool/scheduler/insertScheduler`,
    method: 'post',
    data
  })
}


//获取列表
export function schedulerList(data) {
  return request({
    url: `/tool/scheduler/selectSchedulerPage`,
    method: 'get',
    params: data
  })
}


//获取单个数据
export function viewScheduler(data) {
  return request({
    url: `/tool/scheduler/selectScheduler/${data}`,
    method: 'get'
  })
}

//更新
export function editScheduler(data) {
  return request({
    url: `/tool/scheduler/updateScheduler`,
    method: 'put',
    data
  })
}

//删除
export function deleteScheduler(data) {
  return request({
    url: `/tool/scheduler/deleteScheduler/${data}`,
    method: 'delete'
  })
}


//添加临时运行任务
export function insertSchedulerSimple(data) {
  return request({
    url: `/tool/scheduler/insertSchedulerSimple`,
    method: 'post',
    data
  })
}

